﻿
@using Microsoft.AspNetCore.Components.Sections
@using ZLJ.Application.Share.MultiTenancy

@* 可能用弹窗或页面承载，所以核心组件不应该这样判断权限 *@
@* @attribute [Authorize(PermissionNames.AdministratorBaseInfoPost)] *@

@inherits CreateBaseComponent<TenantDto,EditTenantDto>

<SectionContent SectionName=@(Master.GetHashCode() + "-create-body")>
    <Form @ref="frm" ValidateOnChange="true" Model="createDto" LabelColSpan="6" WrapperColSpan="18" OnFinish="OnFinish">

      
            <FormItem  >
                <Input @bind-Value="@context.Name" />
            </FormItem>
            <FormItem>
                <Input @bind-Value="@context.TenancyName" />
            </FormItem>
            <FormItem>
                <Input @bind-Value="@context.AdminEmailAddress" />
            </FormItem>
            <FormItem >
                <Input @bind-Value="@context.ConnectionString" />
            </FormItem>
            <FormItem >
                <Switch @bind-Value="@context.IsActive" />
            </FormItem>

    </Form>
</SectionContent>

<SectionContent SectionName=@(Master.GetHashCode() + "-create-btns")>
    <Checkbox @bind-Checked=isSaveAndContinue>保存后继续新增</Checkbox>
    <Button OnClick="BtnResetClick" Icon=@IconType.Outline.Redo>重置</Button>
    <Button OnClick="BtnSaveClick" Type=@ButtonType.Primary Loading=isSaving Disabled=isSaving Icon=@IconType.Outline.Save>保存</Button>
</SectionContent>